<%@ page contentType="text/html; charset=UTF-8"%>
<%@ include file="/common/common.jsp"%>
<%--
  ~ Copyright (c) 2011. 晨熹软件版权所有。
  --%>

<html>
  <head>
       <%@ include file="/common/head.jsp"%>

      <style type="text/css">
          .InputStyle2{
    background:rgb(247,247,247);border:1px solid rgb(214,211,214);font-size:16px;align:center;
}      </style>

  </head>
  <script type="text/javascript">
       Ext.onReady(function(){
      var tb = new Ext.Toolbar();
      tb.render('pagemenubar');
      addBtn(tb,'发送','S','phone',function(){onSend()});
      addBtn(tb,'清除','R','erase',function(){reset()});
       });
      function onSend()
      {
        if(Ext.getDom('msgcontent').value==''){
          pop('请输入短信内容') ;
          return;
        };
        if(Ext.getDom('humanids').value==''){
          pop('请指定接收人') ;
          return;
        };
        Ext.Ajax.request({
            form:mainForm,
            success: function(res) {
                pop('已发送');
            }
        });
      }
      function reset(){
         $('#mainForm span').text('');
         $('#mainForm input[type=text]').val('');
         $('#mainForm textarea').val('');
         $('#mainForm input[type=checkbox]').each(function(){
             this.checked=false;
         });
         $('#mainForm input[type=hidden]').each(function(){
             if(this.name.indexOf('con')==0)
             this.value='';
         });
         $('#mainForm select').val('');
         $('#mainForm span[fillin=1]').each(function(){
             this.innerHTML='<img src=/images/base/checkinput.gif>';
         });
   }
  </script>
  <body>
   <div id="pagemenubar"></div>
  <form action="<%=request.getContextPath()%>/msg/msgop.jsp?action=jnjd" name="mainForm"  id="mainForm" method="post" onsubmit="return false">
      <table>
          <colgroup>
					<col width="20%">
					<col width="80%">
				</colgroup>
     
    <tr>
        <td>接收人手机号码：</td>
        <td>
            <table>
                 <colgroup>
					<col width="20%">
					<col width="80%">
				</colgroup>
                <tr>
                      <td class="FieldName" nowrap>技能鉴定学员</td>
                    <td class="FieldValue">
                        <button  class=Browser type="button" onclick="javascript:getBrowser('<%=request.getContextPath()%>/browser/browser.jsp?id=8a00010f2fe2a626012fe2d03d8e00bf','humanids','humanidspan','1');"></button>
                         <input type="hidden"   name="humanids" id="humanids" />
                         <span id = "humanidspan" ></span>
                    </td>
                </tr>

            </table>
        </td>
    </tr>
      <tr>
             <td class="FieldName" nowrap>短信内容：</td>
         <td class="FieldValue" colspan="2">
             <textarea rows="10" cols="40" name="msgcontent" id="msgcontent"></textarea>
         </td>
      </tr>
      </table>
  </form>
<script type="text/javascript">
    function getBrowser(viewurl,inputname,inputspan,isneed){
	var id;
    try{
    id=showDialog(viewurl);
    }catch(e){}
	if (id!=null) {
	if (id[0] != '0') {
		document.getElementById(inputname).value = id[0];
		document.getElementById(inputspan).innerHTML = id[1];
    }else{
		document.getElementById(inputname).value = '';
		if (isneed=='0')
		document.getElementById(inputspan).innerHTML = '';
		else
		document.getElementById(inputspan).innerHTML = '<img src=<%=request.getContextPath()%>/images/base/checkinput.gif>';

            }
         }
 }
</script>
  </body>
</html>